<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <!--
        设计猜数字小游戏，预先定义一个变量值，然后让用户猜数字，并提示数字猜大了，猜小了，还是猜对了
    -->

    <script>

        var number = 100      // 1- 1000

        do {

            var  guess = window.prompt("请输入您猜的数字")

            if(guess > number){
                console.log("您猜的数字大了")
            }else if(guess < number){
                console.log("您猜的数字小了")
            }else{
                console.log("恭喜你！ 猜对了");
            }


        }while(guess!=number)




    </script>
</body>
</html>